#include "DeviceFskManager.h"


string DeviceFskManager::socketControl(int socketStatus,string dev_type){

    string socketCommand;

    if(dev_type.empty()){
        socketCommand="00";  
        return socketCommand;
    }

    if(socketStatus==0){
       if(dev_type=="1208" || dev_type=="1217"){
         socketCommand="02000000";
       }else if(dev_type=="1218"){
         socketCommand="00000000";
       }else{
         socketCommand="01000000";
       }
    }else{
       if(dev_type=="1208" || dev_type=="1217" || dev_type=="1218"){ 
         socketCommand="01000000";
       }else{
         socketCommand="01010000"; 
       }
    }

    return socketCommand;
}


/******************************************************************************
 * FunctionName : alarmRemoteTest
 * Description  : remote test device
 * Parameters   : dev_type
 * Returns      : string
*******************************************************************************/
string DeviceFskManager::alarmRemoteTest(string dev_type){
    
    string testCommand;

    if(dev_type.empty()){
        testCommand = "00";  
        return testCommand;
    }

    if(dev_type=="0019" || dev_type=="001A"){
        testCommand="02FFFFFF";
    }else if(dev_type=="2018"){
        testCommand="02BB0000";
    }else if(dev_type=="020E" || dev_type=="120E" || dev_type=="220E"){
        testCommand="52000000";
    }else if(dev_type=="0020" || dev_type=="0021" || dev_type=="0022" || dev_type=="0023"){
        testCommand="02000000";
    }else if(dev_type=="1014"|| dev_type=="0005" || dev_type=="1109" || dev_type=="2109" || dev_type=="000D" || dev_type=="100D" || dev_type=="200D"|| dev_type=="0013" || dev_type=="1013" || dev_type=="2013" || dev_type=="0022"){
        testCommand="17000000";
    }else {
        testCommand="BB000000";
    }


    return testCommand;
}

/******************************************************************************
 * FunctionName : remoteSilence
 * Description  : remote silence device (only support GS241)
 * Parameters   : 
 * Returns      : char*
*******************************************************************************/
string DeviceFskManager::remoteSilence(){
    
    return "02500000";
}